<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 字面量 


        var reg = /abcd/;
        console.log(reg,typeof reg);


        var regs = new RegExp('abcd');
        console.log(regs,typeof regs);
        // typeof  复杂数据类型得到的都是object

        // 数据 instanceof 类型   => 结果一定是布尔类型 

        console.log(reg instanceof RegExp);
        console.log(reg instanceof Array);

        console.log(regs instanceof RegExp);

    </script>
</body>
</html>